<style>
.titulo-noticia {
	color: #6E122F;
	text-decoration: none;
	font-family: 'Lato', sans-serif;
	font-size: 12px;
	padding-left: 5px;
}
.titulo-noticia:hover {
	color: #D46A8B;
}
.desc-noticia {
	color: #BC3377;
	font-family: 'Lato', sans-serif;
	font-size: 11px;
	float: right;
	text-align: justify;
}
.desc-data {
	color: #AFAFAF;
	font-family: 'Lato', sans-serif;
	font-size: 9px;
}
</style>
<?php 
	$xml = simplexml_load_file("http://g1.globo.com/dynamo/rss2.xml");
	$quant = 10;
	for($i=0;$i<$quant;$i++) {
		$titulo = $xml->channel->item[$i]->title;
		$link = $xml->channel->item[$i]->link;
		$hora = $xml->channel->item[$i]->pubDate;
		$hora = explode(" ",$hora);//[1] - Dia [2] - Mês [3] - Ano [4] - Hora
		$descricao = $xml->channel->item[$i]->description;
		$descricao = str_replace("<br />", "", $descricao);
		$descricao = str_replace("<img", '<img style="float:left; padding-right:5px;" ', $descricao);
		$categoria = $xml->channel->item[$i]->category;
		echo "<a class='titulo-noticia' href='".$link."'><span class='titulo-noticia'>".$titulo."</span></a>";
		echo "<br />";
		echo "<span class='desc-noticia'>".$descricao."</span>";
		echo "<br /><span class='desc-data'>".$hora[1]."/".$hora[2]."/".$hora[3]." às ".$hora[4]."</span><hr />";	
	}
?>
